package com.inifitness.common.xxl;

import java.io.Serial;
import java.io.Serializable;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * Xxl-Job属性配置
 *
 * @author sunjinfeng
 * @version 1.0.0
 * @since 2024/04/18 11:00:00
 */

@Data
@ConfigurationProperties(prefix = "xxl.job")
public class XxlJobProperties {

  private boolean enabled;
  private String accessToken;
  private Admin admin;
  private Executor executor;

  @Data
  public static class Admin implements Serializable {

    @Serial
    private static final long serialVersionUID = -597824478225116635L;
    private String addresses;
  }

  @Data
  public static class Executor implements Serializable {

    @Serial
    private static final long serialVersionUID = 6594155532120884810L;
    private String appname;
    private String address;
    private String ip;
    private int port;

    private String logPath;
    private int logRetentionDays;
  }
}
